home *** CD-ROM | disk | FTP | other *** search
/ Network CD 2 / Network CD - Volume 2.iso / twinopus / dopus / enterdir.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1995-07-13  |  1.4 KB  |  58 lines

  1. /*
  2.  *
  3.  * Enter the selected directory in TwinExpress from DOpus.
  4.  *
  5.  * (c) 1994 by K.P. van Beem (2:280/464.2, patrick.van.beem@aobh.xs4all.nl)
  6.  *
  7.  * Based on the DOpusLhaARexx package by Geoff Seeley (but you can better
  8.  * use GuiArc in stead of DOpus and a script, to deal with archives)
  9.  *
  10.  */
  11.  
  12.  
  13. DOpusPort   = 'DOPUS.1'
  14.  
  15. if ~show(l,"rexxsupport.library") then
  16.     call addlib("rexxsupport.library",0,-30,0)
  17. if showlist('Ports', DOpusPort) = 0 then do
  18.    say 'Directory Opus Arexx port not found. Aborting.'
  19.    exit
  20. end
  21.  
  22. address 'DOPUS.1'
  23. options results
  24.  
  25. /* setup DOpus window and tell user what's happening */
  26. Busy on
  27. TopText "Getting directory of CD, please wait..."
  28.  
  29. /* Get the next directory */
  30. 'Status 6 -1'
  31. GetEntry Result
  32. FilePath = Result
  33. if left(FilePath,1) ~= '*' then do
  34.    TopText "You are not in a 'Twin' directory. !!"
  35.    Busy off
  36.    exit
  37. end
  38. FilePath = SubStr(FilePath,2)
  39. 'GetNextSelected -1'
  40. Directory=Result
  41. if SubStr(Directory,26,9) ~= "Directory" then do
  42.    TopText "Selected item is not a directory. ??"
  43.    Busy off
  44.    exit
  45. end
  46. if right(FilePath,1) = ':' then
  47.    FilePath = FilePath || Strip(left(Directory,25))
  48. else
  49.    FilePath = FilePath || '/' || Strip(left(Directory,25))
  50.  
  51. /* Check for spaces in the filename */
  52. if words(FilePath) > 1 then
  53.    request "Spaces in a filename are not allowed !!"
  54. else
  55.    address AREXX "Rexx:DOpus/ReadDir.rexx" FilePath
  56.  
  57. exit
  58.